import java.util.Scanner;

public class Recursive {

    public static void main13(String[] args) {

        Scanner scan = new Scanner(System.in);
        int num =0;
        int sum =0;
        while(scan.hasNextInt()) {
            int tmp =scan.nextInt();
            sum+=tmp;
            num++;
        }
        System.out.println("avg: "+sum/num);
    }

    public static int add(int a,int b) {
        return a+b;
    }
    public static void main14(String[] args) {
        int a =10;
        int b =20;
        int ret = add(a,b);
        System.out.println(ret);
    }
    public static int sum(int a,int b) {
        return a+b;
    }
    public static double sum(double a,double  b,double c) {
        return a+b+c;
    }
    public static int sum(double f,int g) {
        return (int)f + g;
    }
    public static void main15(String[] args) {
        int a =10;
        int b=20;
        int ret = sum(a,b);
        System.out.println(ret);
        double c =1.2;
        double d =2.4;
        double e =8.8;
        double ans =sum(a,b,c);
        System.out.println(ans);
        double f =9.8;
        int g =2;
        int pos = sum(f,g);
        System.out.println(pos);
    }
    public static int sumFac(int n) {
        //求1-5的和利用递归
        if(n==1) {
            return 1;
        }
        return n+sumFac(n-1);
    }
    public static void main16(String[] args) {

        int n =5;
        int ret = sumFac(n);
        System.out.println(ret);
    }
    public static int DisgitSum(int n) {
        if(n==1) {
            return 1;
        }
        else
           return (n%10)+DisgitSum(n/10);
    }
    public static void main17(String[] args) {
        int n=1729;
        int ans = DisgitSum(n);
        System.out.println(ans);
    }

    public static void main(String[] args) {


    }


}
